<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');

$this->load->helper('html');
?>



<!-- JavaScript -->
<script type="text/javascript" src="<?= base_url() ?>js/wufoo.js"></script>
<script src="<?= base_url() ?>js/jscal2.js"></script>
<script src="<?= base_url() ?>js/lang/en.js"></script>

<!-- CSS -->
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/jscal2.css" />
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/border-radius.css" />
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/steel/steel.css" />


<div id="container">
    <fieldset class="fieldset">
        <legend class="legend">

		| Form Data Periode |</legend>

        <div id="contentform" style="border:solid thin #BBBBBB; height:350px; background-color:#F9F9F9; -moz-border-radius: 5px;  padding-top:10px; padding-bottom:0.3px; margin-right:100px; margin-left:100px;">

            <!-- Start value -->
            <?
            //Setting Value Jika Prosedur yang dilakukan adalah prosedur input biasa.
            $value = array(
                'id_periode' => "",
                'nama_periode' => "",
                'tgl_mulai' => "",
                'tgl_selesai' => "",
                'act_form' => "periode/add"
            );

            //Setting Value pada form Jika melakukan prosedur Edit terhadap data tertentu.
            if ($status == "edit") {
                $value['id_periode'] = $id_periode;
                $value['nama_periode'] = $nama_periode;
                $value['tgl_mulai'] = $tgl_mulai;
                $value['tgl_selesai'] = $tgl_selesai;
                $value['act_form'] = "periode/update/" . $value['id_periode'];
            }//end if
            ?>
            <?= form_open_multipart($value["act_form"]); ?>
            <!-- End value -->

            <table width="847" border="0" bordercolor="#F0F0F0">
                <tr>
                    <td width="905" height="150">
                        <form id="form1" name="form1" method="post">
                            <div align="center">
                                <table width="850" border="0">
                                    <tr>
                                        <td width="80">Periode</td>
                                        <td width="208"><input name="nama_periode" type="text" size="30" value="<?= $value['nama_periode'] ?>"/></td>
                                        <td><? echo form_error('nama_periode');?></td>
                                    </tr>
									<tr>
										<td height="28">Tanggal Mulai</td>
										<td><input name="tgl_mulai" id="f_date1" size="10" maxlength="10" readonly="true" value="<?= $value['tgl_mulai'] ?>"/><input id="f_btn1" type="button" name="Submit22" value="" onclick="f_date1.value=''"/></td>
										<td><? echo form_error('tgl_mulai');?></td>
								    </tr>
                                    <tr>
										<td height="28">Tanggal Selesai </td>
										<td><input name="tgl_selesai" id="f_date2" size="10" maxlength="10" readonly="true" value="<?= $value['tgl_selesai'] ?>"/><input id="f_btn2" type="button" name="Submit22" value="" onclick="f_date2.value=''"/></td>
										<td><? echo form_error('tgl_selesai');?></td>
								    </tr>
                                    <tr>
                                        <td height="28">&nbsp;</td>
                                        <td>
                                            <div align="left">
                                                <input type="submit" name="Submit" value="Simpan" />
												<a href="<?php echo site_url('periode/index') ?>">
												<input type="button" value="Kembali" />
												</a>

                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </form>        
                        <p align="center">&nbsp;</p></td></tr>
            </table>
        </div>
        <p>&nbsp;</p>
		
		 <script type="text/javascript">//<![CDATA[

      var cal = Calendar.setup({
          onSelect: function(cal) { cal.hide() }
      });
      cal.manageFields("f_btn1", "f_date1", "%Y-%m-%d");
      cal.manageFields("f_btn2", "f_date2", "%Y-%m-%d");
      cal.manageFields("f_btn3", "f_date3", "%e %B %Y");
      cal.manageFields("f_btn4", "f_date4", "%A, %e %B, %Y");

    //]]></script>
	
	
    </fieldset>
</div> 
<p>
    <!--container-->
</p>
<p>&nbsp; </p>
